<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputLabel value="#{messages.EditPraiseTitle}"></h:outputLabel>
        </ui:define>
        <ui:define name="body">
<!--            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>-->
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{messages.EditPraiseLabel_id}" for="id"   dir="RTL"/>
                    <h:inputText id="id" value="#{praiseController.selected.id}" title="#{messages.EditPraiseTitle_id}" required="true" requiredMessage="#{messages.EditPraiseRequiredMessage_id}"/>
                    <h:outputLabel value="#{messages.EditPraiseLabel_praiseDate}" for="praiseDate"   dir="RTL"/>
                    <h:inputText id="praiseDate" value="#{praiseController.selected.praiseDate}" title="#{messages.EditPraiseTitle_praiseDate}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{messages.EditPraiseLabel_knowledgeId}" for="knowledgeId"   dir="RTL"/>
                    <h:selectOneMenu id="knowledgeId" value="#{praiseController.selected.knowledgeId}" title="#{messages.EditPraiseTitle_knowledgeId}" >
                        <f:selectItems value="#{knowledgeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{messages.EditPraiseLabel_learningresourceId}" for="learningresourceId"   dir="RTL"/>
                    <h:selectOneMenu id="learningresourceId" value="#{praiseController.selected.learningresourceId}" title="#{messages.EditPraiseTitle_learningresourceId}" >
                        <f:selectItems value="#{learningresourceController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{messages.EditPraiseLabel_studentId}" for="studentId"   dir="RTL"/>
                    <h:selectOneMenu id="studentId" value="#{praiseController.selected.studentId}" title="#{messages.EditPraiseTitle_studentId}" required="true" requiredMessage="#{messages.EditPraiseRequiredMessage_studentId}">
                        <f:selectItems value="#{studentController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <h:commandLink action="#{praiseController.update}" value="#{messages.EditPraiseSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{messages.EditPraiseViewLink}"/>
                <br />
                <h:commandLink action="#{praiseController.prepareList}" value="#{messages.EditPraiseShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{messages.EditPraiseIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
